<!DOCTYPE html>
<html>
	<head>
		<%include ../template/hmeta %>
		<link rel="stylesheet" type="text/css" href="/css/swiper.css">
		<link rel="stylesheet" type="text/css" href="/css/product.css">
		<title>淘一个</title>
	</head>	
	<body class="body-white">		
		<!-- header -->
		<header>
			<div class="user-header">
				<a href="javascript:;" class="h-left h-back"><span>返回</span></a>
				<h2>商品详情</h2>
				<a href="/" class="h-right h-home"><span>首页</span></a>
			</div>
		</header>
		<%if(product){%>
		<input type="hidden" value="<%=product.id%>" id="today-product-id"/>
		<div class="product-swiper-container">
			<div class="product-swiper">
				<ul class="swiper-wrapper">
					<%product.normalImageUrl.forEach(function(val){%>
					<li class="swiper-slide">
						<a href="javascript:;">
							<img src="<%=val%>"/>
						</a>
					</li>
					<%})%>
				</ul>
			</div>
			<div class="swiper-pagination">
			</div>
		</div>
		<div class="product-info">
			<p class="p-title">
				<%-product.title%>
			</p>
  			<div class="p-action clearfix">
  				<div class="left">
  					<label class="p-nowprice">
  						<strong>￥<%=product.price%></strong>
  						<span class="p-tags">
	  						<span class="p-nochange">一口价</span>
							<span class="p-discount">
							<%=(Math.round(product.price/product.oriPrice*100)/10)%>折
	  						</span>
  						</span>
  					</label>
  				</div>
  				<div class="right">
  					<label class="p-additional">
  						<strong><%=product.salesVolume%></strong>人已抢购
  					</label>
  					<label class="p-additional">
  						<span class="p-price">
  							市场价:
  							<span>￥</span><del><%=product.oriPrice%></del>
  						</span>  					
  					</label>	
  				</div>
  			</div>
		</div>
		<%}%>
		<!-- 商品详情 -->
		<div class="product-details">
			<h2>商品详情</h2>
			<ul class="product-image-list main">
				<%if(product.detailsImageUrl){
					product.detailsImageUrl.forEach(function(val){%>
					<li><img class="lazy-img" data-original="<%=global.appConfig.shost+val%>"></li>
					<%})%>
				<%}%>
			</ul>	
		</div>
		<!-- shopping now -->
		<div class="nav-fixed-bottom shopping-action bg-red">
			<div class="left">
				<p class="p-salevolume">
					已售
					<strong></strong>
					件
				</p>
				<p class="p-store">
					库存
					<span></span>
					件
				</p>
			</div>
			<div class="right">
				<a href="javascript:;" class="btn-lg btn-shopping-now">立即闪购</a>
			</div>
		</div>
		<!-- Footer -->
		<% include ../template/user_footer %>
		<div style="height:65px;"></div>
		<!-- script -->
		<script type="text/javascript">
			require(['product.main'])
		</script>
	</body>
</html>